CC = gcc
CXX = g++
CFLAGS = -O2 -Wall -pipe

FLTK_INC = $(shell fltk2-config --cflags)
FLTK_LIB = $(shell fltk2-config --libs --ldflags --use-images --use-gl --use-glut)

DAO_INC = -I/usr/local/dao/include
DAO_LIB = -L/usr/local/lib -ldao

CFLAGS += $(FLTK_INC) $(DAO_INC) -fPIC
LIBS += $(FLTK_LIB) $(DAO_LIB)

MYNAME= fltk

OBJS= fltk.o widget.o window.o group.o button.o drawbox.o image.o glwindow.o gl.o

T= $(MYNAME).so

all:	$T

.cpp.o:
	$(CXX) -c $(CFLAGS) $<     

.c.o:
	$(CC) -c $(CFLAGS) $<     

so:	$T

$T:	$(OBJS)
	$(CC) $(LIBS) -shared -o $@ $(OBJS)

clean:
	rm -f $(OBJS) $T core core.*

depend:
	makedepend -Y -I. *.cpp *.c
# DO NOT DELETE

button.o: widget.h button.h
drawbox.o: widget.h drawbox.h
fltk.o: widget.h group.h window.h glwindow.h button.h drawbox.h image.h gl.h
gl.o: gl.h
glwindow.o: widget.h group.h glwindow.h
group.o: widget.h
image.o: image.h
window.o: widget.h group.h window.h
